package com.team7.happycommunity.personcentor.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("sys/adminList").setViewName("/sys/adminList");
        registry.addViewController("/").setViewName("/index");
        registry.addViewController("/index").setViewName("/index");
        registry.addViewController("/register2").setViewName("/register2");
        registry.addViewController("/password3").setViewName("/password3");
        registry.addViewController("login").setViewName("/index");
        registry.addViewController("log/logList").setViewName("/log/logList");
        registry.addViewController("403").setViewName("/403");
        registry.addViewController("/user").setViewName("/user");
        registry.addViewController("/user_admin").setViewName("/user_admin");
        registry.addViewController("/Modify_password").setViewName("/Modify_password");
        registry.addViewController("/message").setViewName("/message");
        registry.addViewController("/my_publish").setViewName("/my_publish");
        registry.addViewController("/my_join").setViewName("/my_join");
        registry.addViewController("/myAttentionDynamic").setViewName("/myAttentionDynamic");
    }

//    //配置静态资源映射
//    @Override
//    public void addResourceHandlers(ResourceHandlerRegistry registry) {
//        registry.addResourceHandler("/carousel/img/**")
//                .addResourceLocations("file:e:/upload/carousel/img/");
//    }
}
